package cn.steel.mapper;

import cn.steel.domain.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User findUserById(Long id);
    List<User> findUsersPaginated(
            @Param("search") String search,
            @Param("role") String role,
            @Param("status") Integer status);
    void updateUser(User user);
    void deleteUser(Long id);

    User getUserByUsername(String username);

    List<User> findByRole(String role);

    User findByUsername(@Param("username") String username);

}